<template>
  <footer class="footer">
    <div class="footer-container">
      <div class="footer-left">
        <img src="../assets/img.png" alt="logo" class="footer-logo" />
      </div>
      <div class="footer-middle">
        <el-button type="primary" class="online-service" @click="toDeepseek">人工智能客服</el-button>
      </div>
      <div class="footer-right">
        <div class="links">
          <router-link to="/about">关于我们</router-link>
          <span>|</span>
          <router-link to="/cooperation">联系合作</router-link>
          <span>|</span>
          <router-link to="/anti-fraud">防骗秘籍</router-link>
        </div>
        <p class="license">网络文化经营许可证</p>
        <p class="copyright">旺仔牛奶公司 版权所有</p>
        <p class="report">违法不良信息举报电话：111-1111111</p>
      </div>
    </div>
  </footer>
  <!-- 子路由渲染区域 -->
  <router-view></router-view>
</template>

<script setup>
import { useRouter } from 'vue-router';
const router = useRouter();
const toDeepseek = () => {
  router.push('/deepseek');
};
</script>

<style scoped>
.footer {
  background-color: #fafafa;
  padding: 30px 0;
  margin-top: 50px;
}

.footer-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo {
  width: 100px;
  height: auto;
  margin-bottom: 10px;
}

.online-service {
  margin-bottom: 0;
}

.footer-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.links {
  margin-bottom: 15px;
  font-size: 14px;
}

.links a {
  color: #666;
  text-decoration: none;
  margin: 0 5px;
}

.links a:hover {
  color: #ff6700;
}

.license,
.copyright,
.report {
  font-size: 12px;
  color: #999;
  margin-bottom: 5px;
}
</style>